import { IPSSysSFPub } from './ipssys-sfpub';
import { IPSSysSFPubPkg } from './ipssys-sfpub-pkg';
import { PSModelObjectImpl } from '../psmodel-object-impl';

export class PSSysSFPubImpl extends PSModelObjectImpl implements IPSSysSFPub {
  get codeName(): string {
    return this.M.codeName;
  }

  get contentType(): 'CODE' | 'DOC' {
    return this.M.contentType;
  }

  get defaultFlag(): boolean {
    return this.M.defaultFlag;
  }

  get dynaModelFilePath(): string {
    return this.M.dynaModelFilePath;
  }

  get groovySourceFolder(): string {
    return this.M.groovySourceFolder;
  }

  get memo(): string {
    return this.M.memo;
  }

  get modelFolder(): string {
    return this.M.modelFolder;
  }

  get name(): string {
    return this.M.name;
  }

  get pKGCodeName(): string {
    return this.M.pKGCodeName;
  }

  protected pssyssfpubpkgs: IPSSysSFPubPkg[] | null = null;

  getPSSysSFPubPkgs(): IPSSysSFPubPkg[] | null {
    if (this.pssyssfpubpkgs == null) {
      this.pssyssfpubpkgs = this.fillChildListModel(this.M.getPSSysSFPubPkgs, 'pub.IPSSysSFPubPkg') as IPSSysSFPubPkg[];
    }
    return this.pssyssfpubpkgs;
  }

  get psSysSFPubPkgs(): IPSSysSFPubPkg[] | null {
    return this.getPSSysSFPubPkgs();
  }

  findPSSysSFPubPkg(objKey: any): IPSSysSFPubPkg | null {
    return this.getPSModel5('pub.IPSSysSFPubPkg', this.getPSSysSFPubPkgs(), objKey) as IPSSysSFPubPkg;
  }

  get scriptEngine(): string {
    return this.M.scriptEngine;
  }

  get userCat(): string {
    return this.M.userCat;
  }

  get userTag(): string {
    return this.M.userTag;
  }

  get userTag2(): string {
    return this.M.userTag2;
  }

  get userTag3(): string {
    return this.M.userTag3;
  }

  get userTag4(): string {
    return this.M.userTag4;
  }

  get versionString(): string {
    return this.M.versionString;
  }

  get codeMode(): boolean {
    return this.M.codeMode != null ? this.M.codeMode : false;
  }

  get docMode(): boolean {
    return this.M.docMode != null ? this.M.docMode : false;
  }

  get enableModelRT(): boolean {
    return this.M.enableModelRT != null ? this.M.enableModelRT : false;
  }

  get mainPSSysSFPub(): boolean {
    return this.M.mainPSSysSFPub != null ? this.M.mainPSSysSFPub : false;
  }

  get pubModel(): boolean {
    return this.M.pubModel != null ? this.M.pubModel : false;
  }

  get subSysPackage(): boolean {
    return this.M.subSysPackage != null ? this.M.subSysPackage : false;
  }

  get testCodeMode(): boolean {
    return this.M.testCodeMode != null ? this.M.testCodeMode : false;
  }

  get cls(): string {
    return 'PSSysSFPubImpl';
  }

  instanceof(cls: string): boolean {
    if (cls == 'pub.IPSSysSFPub') return true;
    return super.instanceof(cls);
  }
}
